<!doctype html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport"
          content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <script src="https://code.jquery.com/jquery-3.1.1.min.js"></script>
    <script>
        $(function(){
            $('img').click(function(){
                $(this).attr('src','{{captcha_src()}}'+'&_='+Math.random())
            })
        })
    </script>
</head>
<body>
<form action="test9" method="post" enctype="multipart/form-data">
    <input type="text" name="name" placeholder="姓名" value=""/><br/>
    <input type="number" name="age" placeholder="年龄" value=""/><br/>
    <input type="email" name="email" placeholder="邮箱" value=""/><br/>
    头像：<input type="file" name="avatar"/><br/>
    <input type="text" name="yzm" value="" maxlength="5"/> <img src="{{captcha_src()}}"/><br>
    {{csrf_field()}}
    <input type="submit"  value="提交"/>
</form>

@if (count($errors) > 0)
    <div class="alert alert-danger">
        <ul>
            @foreach ($errors->all() as $error)
                <li>{{ $error }}</li>
            @endforeach
        </ul>
    </div>
@endif

</html>